package fm.dongman.animefm.view.adapter

import android.app.Fragment
import android.app.FragmentManager
import android.support.v13.app.FragmentPagerAdapter
import fm.dongman.animefm.view.fragment.BaseFragment

/**
 * ViewPager 适配器
 * Created by shize on 2017/10/12.
 */
class FindPagerAdapter constructor(fragmentManager: FragmentManager,private var title:Array<String>,
                                   private var fragments:Array<BaseFragment>) :FragmentPagerAdapter(fragmentManager){

    override fun getPageTitle(position: Int): CharSequence {
        return title[position]
    }

    override fun getItem(position: Int): Fragment {
        return fragments[position]
    }

    override fun getCount(): Int {
        return fragments.size
    }
}